import { createRouter, RouteRecordRaw, createWebHashHistory } from 'vue-router'
import Login from '@/views/login/index.vue'
import Layout from '@/layout/index.vue'
const routes = [
  {
    path: '/login',
    name: "login",
    component: Login
  },
  {
    path: '/',
    name: 'layout',
    component: Layout,
    redirect: '/login',
    children: [
      {
        path: 'map',
        component: () => import('_v/oneMap/index.vue')
      },
      {
        path: 'monitor',
        component: () => import('_v/monitor/index.vue')
      },
      {
        path: 'static',
        component: () => import('_v/static/index.vue')
      },
    ]
  },
] as RouteRecordRaw[]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
